﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mytrip.Theme
{
    public static class PrimaryLayoutElements
    {
        public static string page()
        {
            StringBuilder result = new StringBuilder();
            result.AppendLine("width: 90%;");
            result.AppendLine("margin-left: auto;");
            result.AppendLine("margin-right: auto;");
            return result.ToString();
        }
        public static string header()
        {
            StringBuilder result = new StringBuilder();
            result.AppendLine("margin-bottom: 0px;");
            result.AppendLine("color: #000;");
            result.AppendLine("padding: 0;");
            result.AppendLine("height: 93px;");
            return result.ToString();
        }
        public static string header_h1()
        {
            StringBuilder result = new StringBuilder();
            if (ThemeSetting.theme() == "blue")
            {
                result.AppendLine("line-height: 2em;");
                result.AppendLine("font-family: Arial, Helvetica, sans-serif;");
                result.AppendLine("font-size: 32px !important;");
            } if (ThemeSetting.theme() == "green")
            {
                result.AppendLine("line-height: 3.2em;");
                result.AppendLine("font-family: Georgia, 'Times New Roman', Times, serif;");
                result.AppendLine("font-size: 26px !important;");
            }
            result.AppendLine("color: #fff;");
            result.AppendLine("font-weight: bold;");
            result.AppendLine("padding: 0;");
            result.AppendLine("margin: 0;");
            return result.ToString();
        }
        public static string div_title()
        {
            StringBuilder result = new StringBuilder();
            if (ThemeSetting.theme() == "blue")
            {
                result.AppendLine("margin-left: -2px;");
                if (ThemeSetting.brouser == "Firefox" | ThemeSetting.brouser == "IE" && ThemeSetting.majorversion < 8)
                {
                    result.AppendLine("top: -1px;"); 
                }
                else
                {
                    result.AppendLine("top:0px;");
                }
            } 
            if (ThemeSetting.theme() == "green")
            {
                result.AppendLine("background:url(green/background_title.png) repeat-x;");
                result.AppendLine("padding: 0 10px 0 10px;");
                result.AppendLine("top:0px;");
            }
            result.AppendLine("position:absolute;");            
            result.AppendLine("float: left;");
            result.AppendLine("height:93px;");
            return result.ToString();
        }
        public static string main()
        {
            StringBuilder result = new StringBuilder();
            if (ThemeSetting.theme() == "blue")
            {
                result.AppendLine("border: 5px #fff solid;");
            } if (ThemeSetting.theme() == "green")
            {
                result.AppendLine("border: 5px #EDEBD5 solid;");
            }
            result.AppendLine("padding: 5px 5px 5px 5px;");
            result.AppendLine("background-color: #fff;");
            result.AppendLine("margin-bottom: 30px;");
            result.AppendLine("_height: 1px;");
            return result.ToString();
        }
        public static string foter()
        {
            StringBuilder result = new StringBuilder();
            result.AppendLine("color: #999;");
            result.AppendLine("padding: 10px 0;");
            result.AppendLine("text-align: center;");
            result.AppendLine("line-height: normal;");
            result.AppendLine("margin: 0;");
            result.AppendLine("font-size: .9em;");
            return result.ToString();
        }
    }
}
